3.179 \(\int \csc ^6(e+f x) (b \tan (e+f x))^n \, dx\)

Optimal. Leaf size=80 \[ -\frac{b^5 (b \tan (e+f x))^{n-5}}{f (5-n)}-\frac{2 b^3 (b \tan (e+f x))^{n-3}}{f (3-n)}-\frac{b (b \tan (e+f x))^{n-1}}{f (1-n)} \]

[Out]

-((b^5*(b*Tan[e + f*x])^(-5 + n))/(f*(5 - n))) - (2*b^3*(b*Tan[e + f*x])^(-3 + n))/(f*(3 - n)) - (b*(b*Tan[e +
 f*x])^(-1 + n))/(f*(1 - n))

________________________________________________________________________________________

Rubi [A]  time = 0.063032, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {2591, 270} \[ -\frac{b^5 (b \tan (e+f x))^{n-5}}{f (5-n)}-\frac{2 b^3 (b \tan (e+f x))^{n-3}}{f (3-n)}-\frac{b (b \tan (e+f x))^{n-1}}{f (1-n)} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^6*(b*Tan[e + f*x])^n,x]

[Out]

-((b^5*(b*Tan[e + f*x])^(-5 + n))/(f*(5 - n))) - (2*b^3*(b*Tan[e + f*x])^(-3 + n))/(f*(3 - n)) - (b*(b*Tan[e +
 f*x])^(-1 + n))/(f*(1 - n))

Rule 2591

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> With[{ff = FreeFactors[Ta
n[e + f*x], x]}, Dist[(b*ff)/f, Subst[Int[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, (b*Tan[e + f*x])/f
f], x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \csc ^6(e+f x) (b \tan (e+f x))^n \, dx &=\frac{b \operatorname{Subst}\left (\int x^{-6+n} \left (b^2+x^2\right )^2 \, dx,x,b \tan (e+f x)\right )}{f}\\ &=\frac{b \operatorname{Subst}\left (\int \left (b^4 x^{-6+n}+2 b^2 x^{-4+n}+x^{-2+n}\right ) \, dx,x,b \tan (e+f x)\right )}{f}\\ &=-\frac{b^5 (b \tan (e+f x))^{-5+n}}{f (5-n)}-\frac{2 b^3 (b \tan (e+f x))^{-3+n}}{f (3-n)}-\frac{b (b \tan (e+f x))^{-1+n}}{f (1-n)}\\ \end{align*}

Mathematica [A]  time = 0.264945, size = 69, normalized size = 0.86 \[ \frac{b \csc ^4(e+f x) \left (2 (n-3) \cos (2 (e+f x))+\cos (4 (e+f x))+n^2-6 n+8\right ) (b \tan (e+f x))^{n-1}}{f (n-5) (n-3) (n-1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^6*(b*Tan[e + f*x])^n,x]

[Out]

(b*(8 - 6*n + n^2 + 2*(-3 + n)*Cos[2*(e + f*x)] + Cos[4*(e + f*x)])*Csc[e + f*x]^4*(b*Tan[e + f*x])^(-1 + n))/
(f*(-5 + n)*(-3 + n)*(-1 + n))

________________________________________________________________________________________

Maple [C]  time = 1.119, size = 26124, normalized size = 326.6 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^6*(b*tan(f*x+e))^n,x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [A]  time = 0.993214, size = 109, normalized size = 1.36 \begin{align*} \frac{\frac{b^{n} \tan \left (f x + e\right )^{n}}{{\left (n - 1\right )} \tan \left (f x + e\right )} + \frac{2 \, b^{n} \tan \left (f x + e\right )^{n}}{{\left (n - 3\right )} \tan \left (f x + e\right )^{3}} + \frac{b^{n} \tan \left (f x + e\right )^{n}}{{\left (n - 5\right )} \tan \left (f x + e\right )^{5}}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6*(b*tan(f*x+e))^n,x, algorithm="maxima")

[Out]

(b^n*tan(f*x + e)^n/((n - 1)*tan(f*x + e)) + 2*b^n*tan(f*x + e)^n/((n - 3)*tan(f*x + e)^3) + b^n*tan(f*x + e)^
n/((n - 5)*tan(f*x + e)^5))/f

________________________________________________________________________________________

Fricas [A]  time = 1.87641, size = 356, normalized size = 4.45 \begin{align*} \frac{{\left (8 \, \cos \left (f x + e\right )^{5} + 4 \,{\left (n - 5\right )} \cos \left (f x + e\right )^{3} +{\left (n^{2} - 8 \, n + 15\right )} \cos \left (f x + e\right )\right )} \left (\frac{b \sin \left (f x + e\right )}{\cos \left (f x + e\right )}\right )^{n}}{{\left ({\left (f n^{3} - 9 \, f n^{2} + 23 \, f n - 15 \, f\right )} \cos \left (f x + e\right )^{4} + f n^{3} - 9 \, f n^{2} - 2 \,{\left (f n^{3} - 9 \, f n^{2} + 23 \, f n - 15 \, f\right )} \cos \left (f x + e\right )^{2} + 23 \, f n - 15 \, f\right )} \sin \left (f x + e\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6*(b*tan(f*x+e))^n,x, algorithm="fricas")

[Out]

(8*cos(f*x + e)^5 + 4*(n - 5)*cos(f*x + e)^3 + (n^2 - 8*n + 15)*cos(f*x + e))*(b*sin(f*x + e)/cos(f*x + e))^n/
(((f*n^3 - 9*f*n^2 + 23*f*n - 15*f)*cos(f*x + e)^4 + f*n^3 - 9*f*n^2 - 2*(f*n^3 - 9*f*n^2 + 23*f*n - 15*f)*cos
(f*x + e)^2 + 23*f*n - 15*f)*sin(f*x + e))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**6*(b*tan(f*x+e))**n,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (b \tan \left (f x + e\right )\right )^{n} \csc \left (f x + e\right )^{6}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^6*(b*tan(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((b*tan(f*x + e))^n*csc(f*x + e)^6, x)